import { createStore } from "vuex";

//创建一个store实例
const store = createStore({
    state() {
        return {
            count: 0,
            user: '',
        }
    },
    mutations: {
        increment(state) {
            state.counnt++
        },
        getUser(state, n) {
            state.user = n
        }
    }
})

export default store